package com.cheney.demo.singletion;

public class SingletionDoubleCheck {

    private SingletionDoubleCheck() {
    }

    private static volatile SingletionDoubleCheck instance = null;

    public static SingletionDoubleCheck getInstance() {
        if (instance == null) {
            synchronized (SingletionDoubleCheck.class) {
                if (instance == null) {
                    instance = new SingletionDoubleCheck();
                }
            }
        }
        return instance;
    }


}
